import common from "@/validator/common";

const name = [
  common.getRequiredRule('姓名'),
  ...common.name
]

const entryDate = [
  common.getRequiredRule('入职日期'),
  ...common.birthday
]

const idcard = [
  common.getRequiredRule('身份证号'),
  ...common.idcard
]

const mobile = [
  common.getRequiredRule('手机号'),
  ...common.mobile
]

/*const jobNumber = [
  common.getRequiredRule('工号'),
  {
    type: 'string',
    pattern: /^\d{11}$/,
    message: '工号只能由11位数字组成'
  }
]*/

const deptId = [
  common.getRequiredRule('所属院系')
]

export default {
  insertRules: {
    name,
    entryDate,
    idcard,
    mobile,
    // jobNumber,
    deptId
  },
  updateRules: {
    name,
    entryDate,
    idcard,
    mobile,
    // jobNumber,
    deptId
  }
}
